package com.itheima.test;

/**
 * @Author 王加鑫
 * @Date 2021/4/17 16:08
 * @Version 1.0
 * 三个和尚比身高
 */
public class LogicMathematicalTest03 {
    public static void main(String[] args) {
        int height1 = 150;
        int height2 = 210;
        int height3 = 165;
        /*
        求最大值
         */
        int tempMax = height1 > height2 ? height1:height2;
        int max = tempMax > height3 ? tempMax:height3;
        System.out.println(max);
        /*
        求最小值
         */
        int tempMin = height1 < height2 ? height1:height2;
        int min = tempMin < height3 ? tempMin:height3;
        System.out.println(min);
        /*
        求中间值
         */
        int middle = (height1+height2+height3) - max - min;
        System.out.println(middle);

        System.out.println("三个和尚身高最大值是:"+max);
        System.out.println("三个和尚身高中间值是:"+middle);
        System.out.println("三个和尚身高最小值是:"+min);

        /*
        求中间值
         */


    }
}
